const { sequelize } = require("../../core/db");
const { Sequelize, Model } = require("sequelize");
class IdCard extends Model {}

IdCard.init(
  {
    eid: {
      type: Sequelize.INTEGER,
      primaryKey: true,
      autoIncrement: true,
    },
    realname: {
      type: Sequelize.STRING,
      comment: "真实姓名",
    },
    cardno: {
      type: Sequelize.STRING,
      comment: "身份证号",
    },
    address: {
      type: Sequelize.STRING,
      comment: "地址",
    },
    sex: {
      type: Sequelize.STRING,
      comment: "性别",
    },
    birthday: {
      type: Sequelize.STRING,
      comment: "出生日期",
    },
  },
  {
    sequelize,
    tableName: "idcard",
  }
);

module.exports = {
  IdCard,
};
